package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.ShopCarBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class CommonOrderListMethods extends BaseMethods {

    private static CommonOrderListMethods m_ins = null;

    public static CommonOrderListMethods getInstance() {
        if (m_ins == null) {
            synchronized (CommonOrderListMethods.class) {
                if (m_ins == null) {
                    m_ins = new CommonOrderListMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
            return "UseList/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }

    // 获取首页数据
    public void UseList(Subscriber<ShopCarBean> subscriber, int uid, String hashid , int  page) {
        Observable observable = initService().UseList(System.currentTimeMillis()+"",
                "1522546fb8e6c8b6c2d37837e99d0730",uid,hashid,page);
        toSubscribe(observable, subscriber);
    }
}
